<footer class="blog-footer">
    <div class="footer-container">
        <div class="footer-content">
            <div class="footer-section">
                <h3 class="footer-title">关于我们</h3>
                <p class="footer-text">
                    {% block footer_about %}
                    晨光博客 - 分享技术与生活
                    {% endblock %}
                </p>
            </div>

            <div class="footer-section">
                <h3 class="footer-title">快速链接</h3>
                <ul class="footer-links">
                    <li><a href="{{ url_for('posts.index') }}">首页</a></li>
                    <li><a href="{{ url_for('posts.archives') }}">文章归档</a></li>
                    <li><a href="{{ url_for('posts.about') }}">关于</a></li>
                </ul>
            </div>

            <div class="footer-section">
                <h3 class="footer-title">联系我们</h3>
                <div class="social-links">
                    {% block social_links %}
                    <div class="social-link-item">
                        <a href="https://gitee.com/big-dawn" aria-label="Gitee" target="_blank">
                            <i class="fab fa-git-alt"></i>
                        </a>
                    </div>
                    <div class="social-link-item">
                        <a href="#" aria-label="WeChat" onclick="copyToClipboard('zsgdxhy', '微信号已复制')">
                            <i class="fab fa-weixin"></i>
                        </a>
                    </div>
                    <div class="social-link-item">
                        <a href="#" aria-label="QQ" onclick="copyToClipboard('2649188733', 'QQ号已复制')">
                            <i class="fab fa-qq"></i>
                        </a>
                    </div>
                    <div class="social-link-item">
                        <a href="mailto:2649188733@qq.com" aria-label="Email">
                            <i class="fas fa-envelope"></i>
                        </a>
                    </div>
                    {% endblock %}
                </div>
            </div>
        </div>

        <div class="footer-bottom">
            <p class="copyright">
                &copy; {{ current_year }} 晨光博客. 保留所有权利.
                {% block extra_footer %}{% endblock %}
            </p>
        </div>
    </div>
</footer>

<style>
    .blog-footer {
        padding: 2rem 0;
        font-family: 'Helvetica Neue', Arial, sans-serif;
    }

    .footer-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1rem;
    }

    .footer-content {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
        margin-bottom: 2rem;
    }

    .footer-section {
        flex: 1;
        min-width: 200px;
    }

    .footer-title {
        color: var(--footer-title-color, #3498db);
        font-size: 1.2rem;
        margin-bottom: 1rem;
        position: relative;
        padding-bottom: 0.5rem;
    }

    .footer-title:after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 50px;
        height: 2px;
        background: var(--footer-accent, #3498db);
    }

    .footer-text {
        color: var(--footer-text, #333);
        line-height: 1.6;
        white-space: nowrap;
    }

    .footer-links {
        list-style: none;
        padding: 0;
    }

    .footer-links li {
        margin-bottom: 0.5rem;
        white-space: nowrap;
    }

    .footer-links a {
        color: var(--footer-link, #666);
        text-decoration: none;
        transition: color 0.3s;
    }

    .footer-links a:hover {
        color: var(--footer-link-hover, #3498db);
    }

    .social-links {
        display: flex;
        flex-wrap: nowrap;
        gap: 1rem;
    }

    .social-link-item {
        white-space: nowrap;
    }

    .social-link-item a {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--footer-link, #666);
        text-decoration: none;
        transition: color 0.3s;
    }

    .social-link-item a:hover {
        color: var(--footer-link-hover, #3498db);
    }

    .social-link-item i {
        font-size: 1.2rem;
    }

    .footer-bottom {
        text-align: center;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(0,0,0,0.1);
    }

    .copyright {
        color: var(--footer-text, #666);
        font-size: 0.9rem;
    }

    /* 轻提示样式 */
    .toast-message {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0,0,0,0.7);
        color: white;
        padding: 10px 20px;
        border-radius: 4px;
        z-index: 1000;
        animation: fadeInOut 2.5s ease-in-out;
    }

    @keyframes fadeInOut {
        0% { opacity: 0; }
        20% { opacity: 1; }
        80% { opacity: 1; }
        100% { opacity: 0; }
    }
</style>

<script>
    function copyToClipboard(text, message) {
        navigator.clipboard.writeText(text).then(() => {
            showToast(message);
        }).catch(err => {
            console.error('复制失败:', err);
            showToast('复制失败，请手动复制');
        });
    }

    function showToast(message) {
        const toast = document.createElement('div');
        toast.className = 'toast-message';
        toast.textContent = message;
        document.body.appendChild(toast);

        setTimeout(() => {
            document.body.removeChild(toast);
        }, 2500);
    }
</script>